import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/components/pageViews/Home'
import Kffw from '@/components/pageViews/kffw'
import Cyfw from '@/components/pageViews/cyfw'
import Swhy from '@/components/pageViews/swhy'
import Zxyd from '@/components/pageViews/zxyd'
import Zdwm from '@/components/pageViews/zdwm'
import Gywm from '@/components/pageViews/gywm'
import Qywh from '@/components/pageViews/gywmPage/qywh'
import Hdfc from '@/components/pageViews/gywmPage/hdfc'
import Dwjs from '@/components/pageViews/gywmPage/dwjs'
import Ryhg from '@/components/pageViews/gywmPage/ryhg'
import Map from '@/components/component/map'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/home'
    },
    {
      path: '/home',
      name: 'Home',
      component: Home
    },
    {
      path: '/kffw',
      name: 'kffw',
      component: Kffw
    },
    {
      path: '/cyfw',
      name: 'cyfw',
      component: Cyfw
    },
    {
      path: '/swhy',
      name: 'swhy',
      component: Swhy
    },
    {
      path: '/zxyd',
      name: 'zxyd',
      component: Zxyd
    },
    {
      path: '/zdwm',
      name: 'zdwm',
      component: Zdwm
    },
    {
      path: '/gywm',
      // name: 'gywm',
      component: Gywm,
      children:[
        {
          path: '/',
          redirect: 'qywh'
        },
        {
          path: 'qywh',
          name: 'qywh',
          component: Qywh,
        },
        {
          path: 'hdfc',
          name: 'hdfc',
          component: Hdfc,
        },
        {
          path: 'dwjs',
          name: 'dwjs',
          component: Dwjs,
        },
        {
          path: 'ryhg',
          name: 'ryhg',
          component: Ryhg,
        },
      ]
    },
    
  ],
  scrollBehavior(to,from,savedPosition) {
    return {x:0,y:0}
  }
})
